package com.zheinfo.biz.domain;

import com.zheinfo.common.annotation.Excel;
import com.zheinfo.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 订单对象 t_order
 * 
 * @author zheinfo
 */
public class Order extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 订单编号 */
    @Excel(name = "订单编号")
    private String orderNumber;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long userId;

    /** 收货人姓名 */
    @Excel(name = "收货人姓名")
    private String receiverName;

    /** 收货人电话 */
    @Excel(name = "收货人电话")
    private String receiverPhone;

    /** 收货人省份 */
    @Excel(name = "收货人省份")
    private String receiverProvince;

    /** 收货人城市 */
    @Excel(name = "收货人城市")
    private String receiverCity;

    /** 收货人区域 */
    @Excel(name = "收货人区域")
    private String receiverArea;

    /** 收货人详细地址 */
    @Excel(name = "收货人详细地址")
    private String receiverAddress;

    /** 商品总金额 */
    @Excel(name = "商品总金额")
    private BigDecimal goodsAmount;

    /** 运费 */
    @Excel(name = "运费")
    private BigDecimal shippingFee;

    /** 优惠金额 */
    @Excel(name = "优惠金额")
    private BigDecimal couponAmount;

    /** 实付金额 */
    @Excel(name = "实付金额")
    private BigDecimal payAmount;

    /** 订单状态 1-待付款 2-待发货 3-待收货 4-已完成 5-已取消 */
    @Excel(name = "订单状态 1-待付款 2-待发货 3-待收货 4-已完成 5-已取消")
    private Integer status;

    /** 支付方式 1-微信支付 2-支付宝 3-银行卡 */
    @Excel(name = "支付方式 1-微信支付 2-支付宝 3-银行卡")
    private Integer paymentMethod;

    /** 支付时间 */
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date paymentTime;

    /** 发货时间 */
    @Excel(name = "发货时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date deliveryTime;

    /** 收货时间 */
    @Excel(name = "收货时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date receiveTime;

    /** 订单备注 */
    @Excel(name = "订单备注")
    private String remark;

    /** 订单明细列表 */
    private List<OrderItem> orderItems;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setOrderNumber(String orderNumber)
    {
        this.orderNumber = orderNumber;
    }

    public String getOrderNumber()
    {
        return orderNumber;
    }
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }
    public void setReceiverName(String receiverName)
    {
        this.receiverName = receiverName;
    }

    public String getReceiverName()
    {
        return receiverName;
    }
    public void setReceiverPhone(String receiverPhone)
    {
        this.receiverPhone = receiverPhone;
    }

    public String getReceiverPhone()
    {
        return receiverPhone;
    }
    public void setReceiverProvince(String receiverProvince)
    {
        this.receiverProvince = receiverProvince;
    }

    public String getReceiverProvince()
    {
        return receiverProvince;
    }
    public void setReceiverCity(String receiverCity)
    {
        this.receiverCity = receiverCity;
    }

    public String getReceiverCity()
    {
        return receiverCity;
    }
    public void setReceiverArea(String receiverArea)
    {
        this.receiverArea = receiverArea;
    }

    public String getReceiverArea()
    {
        return receiverArea;
    }
    public void setReceiverAddress(String receiverAddress)
    {
        this.receiverAddress = receiverAddress;
    }

    public String getReceiverAddress()
    {
        return receiverAddress;
    }
    public void setGoodsAmount(BigDecimal goodsAmount)
    {
        this.goodsAmount = goodsAmount;
    }

    public BigDecimal getGoodsAmount()
    {
        return goodsAmount;
    }
    public void setShippingFee(BigDecimal shippingFee)
    {
        this.shippingFee = shippingFee;
    }

    public BigDecimal getShippingFee()
    {
        return shippingFee;
    }
    public void setCouponAmount(BigDecimal couponAmount)
    {
        this.couponAmount = couponAmount;
    }

    public BigDecimal getCouponAmount()
    {
        return couponAmount;
    }
    public void setPayAmount(BigDecimal payAmount)
    {
        this.payAmount = payAmount;
    }

    public BigDecimal getPayAmount()
    {
        return payAmount;
    }
    public void setStatus(Integer status)
    {
        this.status = status;
    }

    public Integer getStatus()
    {
        return status;
    }
    public void setPaymentMethod(Integer paymentMethod)
    {
        this.paymentMethod = paymentMethod;
    }

    public Integer getPaymentMethod()
    {
        return paymentMethod;
    }
    public void setPaymentTime(Date paymentTime)
    {
        this.paymentTime = paymentTime;
    }

    public Date getPaymentTime()
    {
        return paymentTime;
    }
    public void setDeliveryTime(Date deliveryTime)
    {
        this.deliveryTime = deliveryTime;
    }

    public Date getDeliveryTime()
    {
        return deliveryTime;
    }
    public void setReceiveTime(Date receiveTime)
    {
        this.receiveTime = receiveTime;
    }

    public Date getReceiveTime()
    {
        return receiveTime;
    }
    public void setRemark(String remark)
    {
        this.remark = remark;
    }

    public String getRemark()
    {
        return remark;
    }

    public void setOrderItems(List<OrderItem> orderItems)
    {
        this.orderItems = orderItems;
    }

    public List<OrderItem> getOrderItems()
    {
        return orderItems;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("orderNumber", getOrderNumber())
            .append("userId", getUserId())
            .append("receiverName", getReceiverName())
            .append("receiverPhone", getReceiverPhone())
            .append("receiverProvince", getReceiverProvince())
            .append("receiverCity", getReceiverCity())
            .append("receiverArea", getReceiverArea())
            .append("receiverAddress", getReceiverAddress())
            .append("goodsAmount", getGoodsAmount())
            .append("shippingFee", getShippingFee())
            .append("couponAmount", getCouponAmount())
            .append("payAmount", getPayAmount())
            .append("status", getStatus())
            .append("paymentMethod", getPaymentMethod())
            .append("paymentTime", getPaymentTime())
            .append("deliveryTime", getDeliveryTime())
            .append("receiveTime", getReceiveTime())
            .append("remark", getRemark())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}